/**
 * Created by JLB1 on 2017/2/7.
 */

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import AJAX from '../../lib/ajax';
import Tools from '../../lib/tools';
import Config from '../../lib/config';

require('../../styles/common.less');
require('../../styles/lux.less');
require('../../styles/resetWeui.less');
require('./PickupGuide.less');

class PickupGuide extends Component {
    render() {
        const wx_type = window.localStorage.getItem('wx_type');

        const name = (Tools.getParams().type == 1 && wx_type === 'logis') ? '近邻宝校区' : '近邻宝社区';
        const img = (Tools.getParams().type == 1 && wx_type === 'logis') ? Config.code_campus_img : Config.code_community_img;

        return (
            <div className="lux-pt10 lux-pl10 lux-pr10 lux-pb10 lux-center">

                <div className="code-box">
                    <div className="lux-flex-1 lux-center lux-fxd-c">
                        <img src={img} alt="" />
                        <div className="lux-mt10">{name}公众号二维码</div>
                    </div>

                    <div className="lux-ta-c">
                        <div className="lux-mt10">为了给您提供更好的服务，请长按识别关注</div>
                        <div className="lux-mt5">关注<span>「{name}」</span>取件</div>
                    </div>
                </div>
            </div>
        );
    }
}

ReactDOM.render(<PickupGuide />, document.getElementById('app'));

if (module.hot) {
    module.hot.accept();
}